package cn.shengchao.wecom.event;

import cn.shengchao.wecom.schedule.WeComTlxSync;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @program: examstarapi
 * @description: 企微业务事件处理监听
 * @author: Xiong weiqiang
 * @create: 2025-04-25 17:12
 */
@Component
public class WeCpEventListener {
    @Autowired
    WeComTlxSync weComTlxSync;
    @Async
    @EventListener
    public void handleWeCpEvent(WeComUserSyncEvent event) {
        System.out.println("收到企微同步本地事件：" );
        weComTlxSync.syncTlx();
    }
    @Async
    @EventListener
    public void handleWeComUserQrcodeCheckEvent(WeComUserQrcodeCheckEvent event) {
        System.out.println("收到企微联系我二维码检查本地事件：" );
        weComTlxSync.checkContactMeQrcode(event.getUserIds());
    }

}